Processors sold by MIPS Technologies®, Sunnyvale, Calif., use and handle addresses in a unique manner. FIG. 1 illustrates a MIPS virtual memory map for a 32-bit processor. The memory map includes fixed memory address segments. Each fixed memory address segment has fixed attributes, such as access mode, cache features and memory map features. In particular, there is a defined user mode region 102 and kernel mode regions 104, 106, 108 and 110.
MIPS processors have three operating modes: user mode, supervisor mode and kernel mode. In user mode, a single, uniform virtual address space is available. This uniform virtual address space is referred to as a user segment. The supervisor mode is designed for operating systems. In supervisor mode, the processor operates in a kernel mode and the operating system runs in supervisor mode. The processor is in kernel mode whenever an exception is detected and it remains in kernel mode until an Exception Return (ERET) instruction is executed. The ERET instruction restores the processor to the mode existing prior to the exception.
The memory map includes a user space region called “kuseg” 102. This user space region supports user mode. The user space region is a 2 GB region spanning virtual addresses 0x0000 0000 through 7FFF FFFF. These addresses are translated by a Memory Management Unit (MMU).
For the kernel mode, there is an unmapped cached region called “kseg0” 104. This region is 512 MB ranging from virtual address 0x8000 000 through 9FFF FFFF. These virtual addresses are translated into physical addresses by stripping off the top 3 most significant bits and mapping them contiguously into the lower 512 MB of physical memory. Addresses in this region are almost always accessed through the cache. The addresses are used for most programs and data in systems not using an MMU and are used by the Operating System (OS) kernel for systems that use an MMU.
The unmapped and uncached region is called “kseg1” 106. This region is also 512 MB, with virtual addresses ranging from 0xA000 0000 through BFFF FFFF. These virtual addresses are mapped into physical addresses by stripping off the leading 3 bits, giving a duplicate mapping of the lower 512 MB of physical memory. In this space, access does not rely upon the cache.
The mapped region is called “kseg2” 108 and “kseg3” 110. This 1 GB region spans virtual addresses 0xC000 0000 through FFFF FFFF. This area is only accessible in kernel mode. This region is translated through the MMU.
Thus, the fixed address segmentation map of the MIPS architecture limits “kseg0” to 512 MB of system memory. Some architectures work around this limitation by utilizing a HighMem enhancement to Linux®. HighMem gives the OS the flexibility of accessing memory that is not accessible through Kseg0. HighMem allows the kernel to create temporary mappings on the fly to access high-memory, thus extending physical memory that can be accessed. This process of creating mappings on the fly has a performance penalty. Further, the additional address space is limited in how it can be used.
In view of the foregoing, it would be desirable to provide an alternate approach to expand the amount of physical memory accessible in kernel mode.